<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增收款认领')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-incoming-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款人：</label>
                <div class="col-sm-8">
                    <input name="incomingName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款银行：</label>
                                    <div class="col-sm-8">
                        <select name="bankName" class="form-control m-b" th:with="type=${@dict.getType('work_bank')}" required>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>

            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款账号：</label>
                <div class="col-sm-8">
                    <input name="bankAccount" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款额度：</label>
                <div class="col-sm-8">
                    <input name="money" class="form-control" type="text" required>
                </div>
            </div>
            <!--    <div class="form-group">
                    <label class="col-sm-3 control-label">返款金额：</label>
                    <div class="col-sm-8">
                        <input name="refund" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">税金：</label>
                    <div class="col-sm-8">
                        <input name="taxes" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">已销额度：</label>
                    <div class="col-sm-8">
                        <input name="expenseLimit" class="form-control" type="text">
                    </div>
                </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">来款日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="incomingDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "work/incoming"
        $("#form-incoming-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-incoming-add').serialize());
            }
        }

        $("input[name='incomingDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>